package com.qf.postProcessor;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;

/**
 * @author bss
 * @version V1.0
 * @Project maven
 * @Package com.qf.postProcessor
 * @Description:
 * @Date 2022/9/27 22:12
 */
public class MyBeanpostProcessor implements BeanPostProcessor {

    @Override
    public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
        System.out.println("后处理器： 在init 之前执行" + bean.getClass());
        return bean;
    }

    @Override
    public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
        System.out.println("后处理器： 在init 之后执行" + bean.getClass());
        return bean;
    }
}
